package siestageek.exam;

import java.util.Scanner;

public class EX02_AccountService 
			implements EX02_IAccountService {

	private static EX02_IAccountDAO as = null;
	
	public EX02_AccountService() {
		as = new EX02_AccountDAO();
	}
	
	@Override
	public void createAccount() {
		Scanner sc = new Scanner(System.in);
		EX02_AccountVO avo = new EX02_AccountVO();   
		System.out.println( 
			"계좌를 생성하기 위한 기본정보를 입력하세요" );
		System.out.println( "계좌번호를 입력하세요" );
		avo.setAid( sc.next() );
		System.out.println( "계좌잔액을 입력하세요" );
		avo.setBalance( sc.next() );
		System.out.println( "이자율을 입력하세요" );
		avo.setInterestRate( sc.next() );
		
		if ( as.insertAccount( avo ) )
			System.out.println( "계좌 생성완료!" );
		else 
			System.out.println( "계좌 생성실패!" );
		
	}

	@Override
	public void readAccount() {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void modifyAccount() {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void removeAccount() {
		// TODO Auto-generated method stub
		
	}

	@Override
	public float getMonthlyInterestRate() {
		// TODO Auto-generated method stub
		return 0;
	}

	@Override
	public void withdraw() {
		// TODO Auto-generated method stub
		
	}

	@Override
	public void deposit() {
		// TODO Auto-generated method stub
		
	}

}



